<?php

namespace app\rabbitmq\controller;
use think\Log;

class Index {
    public function index() {
        return _rabbitMqPublish('class_event', [
            'class' => '\app\service\Cluster111',
            'method'   => 'log',
            'params'    => ['aaaaaaaaa','bbbbbbbbbb','caaaaaaaaaaa']
        ]);
        return action('rabbitmq/MqProducer/publish', ['data' => [
            'action'    =>  'api/Dymanic/interactionCount',
            'data'      => ['userid'=>20033515]
        ], 'name' => 'action']);
        return action('api/Dymanic/interactionCount', ['userid'=>20033515]);
        action('rabbitmq/MqProducer/publish', ['data' => [
            'action'    =>  'rabbitmq/index/log2',
            'data'      => ['value'=>time()]
        ], 'name' => 'action']);
        return json([
            'code' => 200,
            'msg'  => '队列推送成功',
        ]);
    }

    public function log2($value='')
    {
        Log::write($value, 'error');
    }

}